Skip to content

test(test-vectors): add differential harness across sdk versions#163

Open
DSOTec wants to merge 2 commits into
wraith-protocol:developfrom
DSOTec:feat/132-test-vectors-differential-harness
Open

test(test-vectors): add differential harness across sdk versions#163
DSOTec wants to merge 2 commits into
wraith-protocol:developfrom
DSOTec:feat/132-test-vectors-differential-harness

Conversation

@DSOTec

@DSOTec DSOTec commented Jul 25, 2026

Copy link
Copy Markdown

No safety net today catches a version bump that silently changes cryptographic output for existing inputs — semver numbers alone don't verify actual behavior. Add differential.ts: it installs the pinned reference version (vN-1, named in differential.config.json) into a throwaway directory, runs every vectors/stellar.json fixture through both that build and the workspace tip via the shared differential-runner.mjs, and diffs the outputs field by field. Unwaived diffs fail the run; waivers in differences.json require a non-empty reason and the script refuses to run without one.

Running the harness for real against the pinned reference (1.3.0) surfaced two genuine issues:

  • generateStealthAddress's default view-tag scheme changed (legacy prefix to the domain-separated v2 prefix) in commit f7def68 (PR feat(audit): Stellar chain module cryptographic audit report and fixes #93), before the 1.4.0 minor, without a major bump. This is a real, already-shipped protocol change — documented and waived in differences.json with the commit reference, exactly the kind of entry this file exists to hold.
  • signWithScalar had a leftover debug console.log that wrote to stdout on every signing call, corrupting the runner's JSON-over-stdout protocol (and explaining the stray "SCALAR:" noise in the existing test output). Removed it.

Wire a differential job into ci.yml that runs on every PR touching src/chains/** (via dorny/paths-filter) and unconditionally on push to main/develop, so the acceptance criterion of a green run on develop is checked directly rather than assumed.

Closes #132

No safety net today catches a version bump that silently changes
cryptographic output for existing inputs — semver numbers alone don't
verify actual behavior. Add differential.ts: it installs the pinned
reference version (vN-1, named in differential.config.json) into a
throwaway directory, runs every vectors/stellar.json fixture through both
that build and the workspace tip via the shared differential-runner.mjs,
and diffs the outputs field by field. Unwaived diffs fail the run; waivers
in differences.json require a non-empty reason and the script refuses to
run without one.

Running the harness for real against the pinned reference (1.3.0) surfaced
two genuine issues:

- generateStealthAddress's default view-tag scheme changed (legacy prefix
  to the domain-separated v2 prefix) in commit f7def68 (PR wraith-protocol#93), before the
  1.4.0 minor, without a major bump. This is a real, already-shipped
  protocol change — documented and waived in differences.json with the
  commit reference, exactly the kind of entry this file exists to hold.
- signWithScalar had a leftover debug `console.log` that wrote to stdout on
  every signing call, corrupting the runner's JSON-over-stdout protocol
  (and explaining the stray "SCALAR:" noise in the existing test output).
  Removed it.

Wire a `differential` job into ci.yml that runs on every PR touching
src/chains/** (via dorny/paths-filter) and unconditionally on push to
main/develop, so the acceptance criterion of a green run on develop is
checked directly rather than assumed.

Closes wraith-protocol#132
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@DSOTec Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test-vectors: differential harness across SDK versions

1 participant